package com.icss.flow.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum OpEnum {
    LIKE("like", " like \"%%%s%%\""),
    BETWEEN("between", " between %s and %s");
    private final String op;
    private final String template;

    public static OpEnum getOp(String extName) {
        for (OpEnum value : OpEnum.values()) {
            if (value.getOp().equalsIgnoreCase(extName)) {
                return value;
            }
        }
        return null;
    }
}
